//没有px  则转为带有px   有就过
const setPx=(style)=>{
    //把样式style元素传
    const pxObj=[];
    const arr=['width','height','left','top','lineHeight'];
    for(let key in style){
        if(arr.includes(key)){
            pxObj[key]=style[key]+"px";

        }else{
            pxObj[key]=style[key]
        }
    }
    return pxObj;
}
export default setPx